사이트 내 전체검색
Corona와 Phonegap, 그리고 Titanium을 비교한다면?"
로빈아빠
https://cmd.kr/iphone/29 URL이 복사되었습니다.

본문

저는 웹 디벨로퍼이고 제 웹제품들을 iPhone으로 옮기고 싶습니다. 제품들 중 하나는 구글 맵스(Google Maps) 같은 것인데요: 폰의 스크린 상에 맵을 보여주는 것입니다. 맵을 드래그 하거나 맵 크기를 조정할 수 있고, 맵에 추가되는 정보를 볼 수도 있습니다.

HTML와 CSS, 그리고 Javascript를 이용해서 iPhone 고유의 앱들을 개발할 수 있게 해주는 기술들이 있는걸로 알고 있는데요. 다음의 것들이 제가 알고 있는 것들입니다:

위의 것말고 다른 것들 중에 이와 비슷한 제품들이 더 있나요? 있다면 그것들 사이의 차이점은 무엇인가요? 그리고 그중에 제가 어떤 것을 선택해야 할까요?


================================================================


저는 단지 가장 많은 추천표를 받은 맨 위에 위치한 답변에 대한 코멘트를 쓰기 위해 stackoverflow에 등록했습니다. stackoverflow의 단점은 새로운 사람들이 코멘트를 쓸 수 없다는 겁니다. 따라서 저는 지금 이 코멘트를 하나의 답변에 보다 가깝게 만들어야 하죠.

Rory Blyth님의 답변은 위의 두 javascript 모바일 프레임워크들에 대한 몇몇 유효한 정보를 포함하고 있습니다. 하지만, 그가 말하는 핵심들은 올바른 것이 아닙니다. 사실, Titanium과 PhoneGap는 서로 다르다기보다는 오히려 유사하다고 봐야하죠. 두가지 모두 javascript API들을 통해 모바일 폰 기능들을 접하게 해 줍니다. 그리고 애플리케이션의 로직(논리, html, css, javascript)은 네이티브 WebView 컨트롤러 안에서 실행되죠.

  1. PhoneGap은 그저 웹 앱의 네이티브 레퍼(wrapper)가 아닙니다. "웹 앱"은 위치정보, 가속도계 카메라, 컨택, 데이터베이스, 파일 시스템 등의 모바일 폰 기능들에 접속하죠. 기본적으로 모바일 폰 SDK가 제공하는 모든 기능들은 javascript로 "연결"될 수 있습니다. 반면, 모바일 웹 브라우저 상에서 구동되는 일반적인 웹 앱들은 이러한 기능들에 대부분 접속할 수 없습니다. (보안이 첫번째 이유이지요). 그러므로, PhoneGap 앱은 웹 앱이라기보다는 일종의 모바일 앱에 더 가깝습니다. 님은 확실히 PhoneGap API들을 전혀 사용하지 않는 웹을 래핑(wrap)하는데 PhoneGap을 사용할 수 있습니다. 하지만 그게 PhoneGap의 원래 목적은 아니라는 겁니다.

  2. Titanium은 님의 html, css 또는 javascript 코드를 절대로 "네이티브 비트들" 안으로 컴파일해 주지 않습니다. 그것들은 리소스들로서 함께 묶여서 실행가능한 번들(executable bundle)로 보내집니다. 임베디드 이미지 파일(embedded image file)처럼 말입니다. 애플리케이션이 구동할때, 이 리소드들이 UIWebView 컨트롤러 안으로 로드되고 그 안에서 (물론, 네이티브 비트들이 아닌 javascript로서) 구동됩니다. javascript를 네이티브 코드로 바꿔 주는 (혹은 objective-c로 바꿔주는) 컴파일러는 없습니다. 이러한 일이 PhoneGap에서도 같은 방식으로 이루어 집니다. 아키텍처적인 관점에서 볼때, 위의 두가지 프레임워크들은 매우 유사합니다.

자, 그럼 그것들 사이에 차이점은 존재하는 것일까요? 예, 있습니다. 첫째, Titanium은 PhoneGap에 비해 좀 더 많은 모바일 폰 기능들을 javascript와 연결시켜 주기 때문에 기능이 좀 더 풍부한 것처럼 보입니다. 대부분 알고 계시겠지만, PhoneGap은 그리 많은 네이티브 UI 컴포넌트들을 javascript로 노출시키지 않습니다. 반면, Titanium은 포괄적인 UI API들을 javascript 안으로 호출하여 모든 종류의 네이티브 UI 컨트롤러들을 생성하고 제어할 수 있게 해주죠, 이러한 UI API들을 활용하여, Titanium 앱은 PhoneGap보다 좀 더 "네이티브"하게 보일 수 있는 것이죠. 둘째, PhoneGap은 Titanium보다 모바일 폰 플랫폼을 좀 더 지원합니다. PhongGap API들은 좀 더 포괄적이며 따라서 iPhone, Android, Blackberry, Symbian 등의 다양한 플랫폼들 상에서 사용될 수 있습니다. Titanium은 주로 iPhone과 Android을 대상으로 하고 있죠. 최소한 현재는 그렇습니다. Titanium 몇몇 API들은 특정 플랫폼에 고유한 특성을 가지고 있습니다. (예를 들어, iPhone UI API들). 이러한 API들을 사용하면 애플리케이션의 크로스 플랫폼(cross-platform) 기능이 저하되죠.

따라서, 만약 님이 님의 앱을 좀 더 "네이티브"하게 보이도록 하고 싶다면, Titanium이 좋은 선택이 되겠죠. 그리고 만약 님의 앱을 다른 플랫폼으로 보다 쉽게 "포트(port)"하고 싶다면 PhoneGap가 좋은 선택이 될 겁니다.

"

원문보기

I registered with stackoverflow just for the purpose of commenting on the mostly voted answer on top. The bad thing is stackoverflow does not allow new members to post comments. So I have to make this comment more look like an answer.

Rory Blyth's answer contains some valid points about the two javascript mobile frameworks. However, his key points are incorrect. The truth is that Titanium and PhoneGap are more similar than different. They both expose mobile phone functions through a set of javascript APIs, and the application's logic (html, css, javascript) runs inside a native WebView control.

  1. PhoneGap is not just a native wrapper of a web app. Through the PhoneGap javascript APIs, the "web app" has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, etc. Basically any function that the mobile phone SDK provides can be "bridged" to the javascript world. On the other hand, a normal web app that runs on the mobile web browser does not have access to most of these functions (security being the primary reason). Therefore, a PhoneGap app is more of a mobile app than a web app. You can certainly use PhoneGap to wrap a web app that does not use any PhoneGap APIs at all, but that is not what PhoneGap was created for.

  2. Titanium does NOT compile your html, css or javascript code into "native bits". They are packaged as resources to the executable bundle, much like an embedded image file. When the application runs, these resources are loaded into a UIWebView control and run there (as javascript, not native bits, of course). There is no such thing as a javascript-to-native-code (or to-objective-c) compiler. This is done the same way in PhoneGap as well. From architectural standpoint, these two frameworks are very similar.

Now, are they any different? Yes. First, Titanium appears to be more feature rich than PhoneGap by bridging more mobile phone functions to javascript. Most noticeably, PhoneGap does not expose many (if any) native UI components to javascript. Titanium, on the other hand, has a comprehensive UI APIs that can be called in javascript to create and control all kinds of native UI controls. Utilizaing these UI APIs, a Titanium app can look more "native" than a PhoneGap app. Second, PhoneGap supports more mobile phone platforms than Titanium does. PhongGap APIs are more generic and can be used on different platforms such as iPhone, Android, Blackberry, Symbian, etc. Titanium is primarily targeting iPhone and Android at least for now. Some of its APIs are platform specific (like the iPhone UI APIs). The use of these APIs will reduce the cross-platform capability of your application.

So, if your concern for your app is to make it more "native" looking, Titanium is a better choice. If you want to be able to "port" your app to another platform more easily, PhoneGap will be better.

"

제가 알고 있는 바에 따르면, 두가지의 차이는 다음과 같습니다. :

  • PhoneGap은 기본적으로 웹 앱들인 네이티브 레퍼(native wrappers)들을 만들어 냅니다.. 그것은 WhateverYourPlatformIs 프로젝트를 뱉어내고(spit out) 님은 그것을 빌드 및 디플로이(deploy)하죠. 만약 지금 우리가 iPhone에 대한 얘기를 하고 있는 것이라면, (제가 많은 시간을 쏟아붓고 있는 영역이기 때문에 말씀드릴 수 있는 것은) 그것이 하나의 웹 앱 런처(웹 앱 고유의 Springboard 이이콘을 얻는 지름길이기 때문에 하나의 네이티브 앱처럼 런칭할 수 있습니다)를 만드는 것과 그리 다르지 않다는 겁니다. "앱" 그 자체는 여전히 html/js 등입니다. 그리고 호스트 부라우저 컨트롤(hosted browser control) 안에서 구동되죠. 이것 이외에 PhoneGap이 제공해 주는 것은 그것이 JavaScript와 네이트비 API들 간의 연결고리(bridge)가 된다는 것입니다. 따라서 님은 PhoneGap APIs에 대해여 JavaScript를 쓰는 거죠. 그리고 그후 PhoneGap이 적절하고 상승하는 네이티브 호출을 만듭니다. 이런 측면에서 그것은 보통의 구식 웹 앱을 디플로이하는 것과는 다릅니다.

  • Titanium 소스는 네이티브 비트(native bit)로 컴파일됩니다. 즉, 님의 html/js 등이 그저 단순히 하나의 프로젝트에 첨부되어 웹 브라이저 컨트롤 안으로 호스팅되는 것이 아니라는 겁니다. - 그것들이 네이티브 앱들로 바뀌는 것이죠. 이 말의 의미는, 예를 들어, 님 앱의 인터페이스가 네이티브 UI 컴포넌트들로 구성될 것이라는 겁니다. 네이티브 앱 없이도 네이티브하게 보이고 네이티브하게 느껴지도록 만드는 방법이 몇 가지 있습니다. 하지만... 글쎄요... 보통은 그게 악몽이 될 때가 많죠.

위 두가지의 유사점은 님이 가지고 있는 모든 것들을 전형적인 웹 기술들(html/js/css 그리고 기타 등등)을 사용해서 쓸 수 있다는 것이죠. 그리고 커스텀 JavaScript API를 통해 네이티브 기능들에 접속할 수 있다는 겁니다.

하지만, PhoneGap 앱(아니면 PhoneGapp이 맞나요? 잘 모르겠네요...)들은 웹 앱으로서 그 생명을 시작하고 또한 웹앱으로서 그 생명이 끝나죠. iPhone 상에서는, 님의 html/js/등등이 단지 UIWebView 컨트롤 안에서 실행되는 것이고, PhoneGap JavaScript API들 상에서 님의 js 호출들이 네이티브 API로 라우트(routed)됩니다.

Titanium 앱들은 네이티브 앱들이 됩니다. - 그것들은 웹 디벨로포먼트 기술(web dev tech)을 이용하여 개발됩니다. .

이것이 실제로 의미하는 바는 뭘까요?

  1. Titanium 앱은 하나의 "실제" 앱처럼 보일 겁니다. 왜냐하면 궁극적으로 그것은 정말로"실제" 앱이니까요.

  2. PhoneGap 앱은 브라우저 컨트롤 안에서 호스팅되는 하나의 웹 앱으로 보일 겁니다. 왜냐하면 궁극적으로 그것은 정말로 브라우저 컨트롤 안에서 호스팅되는 웹 앱이니가요.

님에게 적합한게 어떤 건지 생각해 보세요.

  • 만약 님이 웹 디벨로프먼트 기술들을 사용해서 네이티브 앱들을 쓰기 원한다면, Titanium이 가장 좋은 선택이 되겠죠.

  • 만약 님이 현실적으로 멀티플 플랫폼들(iPhone, Android, Blackberry, 그리고 님이 포함시키고자하는 어떤 것들)로 디플로이할 수 있는 웹 디벨로프먼트 기술들을 사용해서 앱을 쓴다면, 그리고 통일된 JavaScript API를 통하여 네이티브 플랫폼 기능들(GPS, 가속도계 등)의 서브셋에 접속하고자 한다면 아마 PhoneGap을 사용하고 싶어지겠죠.

님이 다음과 같은 질문을 할 수도 있겠죠: 왜 제가 웹 상에서 호스팅되는 웹 앱 대신 PhoneGapp(그냥 이 이름으로 쓰기로 합시다)를 쓸거라고 생각하죠? 그렇게 하지 않아도 여전히 몇몇 네이티브 다바이스 기능들에 접속할 수 있지 않나요? 또한 유저로 하여금 제 "네이티브" 앱을 다운받아 설치하게 하는 것 대신 그냥 편리하게 웹 디벨로프먼트를 할 수도 있지 않나요?

이에 대한 답변을 하겠습니다: 왜냐하면 님의 PhoneGapp를 App Storedp 제출해서 돈을 받을 수 있기 때문이죠. 또한 유저 님의 앱을 쉽게 잊을 수 없도록 해주는 런처 아이콘(launcher icon)을 얻을 수도 있습니다. (저는 북마크는 잘 있어도 앱 아이콘은 잘 안 잊게 되더군요).

님은 확실히 님의 웹호스팅된 웹 앱에 접속하는 것을 유료화할 수 있습니다. 하지만 실제로 얼마나 사람들이 이러한 접속을 위한 모든 과정을 선뜻 진행하려 할까요? App Store를 이용하면, 앱을 하나 골라서 "구입" 버튼을 치고, 비밀번호를 입력합니다. 그리고 그걸로 끝이죠. 설치됩니다. 그리고 몇 초 후면 사용할 수 있습니다. 만약 제가 다른 누군가가 운영하는 모바일 웹 트랜젝션(거래) 인터페이스를 사용해야 한다면, 제 이름, 주소, 전화번호, CC넘버 등을 입력해야 하죠. 물론 그렇게 하고 싶지 않지만 그렇게 해야 하죠. 그리고 결론적으로 저는 이 모든 과정을 진행하지 않을 겁니다. 또한, 저는 Apple을 믿습니다 - 저는 스티브 잡스(Steve Jobs)가 제 개인정보에 로그인해서 제 CC에다 외설적인 잡지구독 비용을 청구하지는 않을 거라고 확신해요.

어쨌든, 웹 디벨로프먼트 기술이 관련되어 있다는 것만 제외하면,PhoneGap과 Titanium는 매우 다릅니다. - 단지 표면적으로 비교할 경우에 말입니다.

저는 웹 앱들을 싫어합니다. 그리고 만약 님이 iTunes App Store 리뷰들을 읽어 보시면, 유저들이 이런 점들을 꽤 많이 지적하고 있습니다. 제 폰 상에는 그냥 쓰레기 같은 앱들이 몇개 있습니다. 물론 그 앱들의 이름은 거론하지는 않겠습니다. 그리고 그것들은 UIWebView 인스턴스들 안으로 호스팅되는 웹 앱들입니다. 만약 제가 웹 앱을 하나 사용하고 싶어진다면, 저는 Safari를 열어서 거기 있는 것들 중에서 하나 찾을 겁니다. 저는 iPhone-y 물건들이 필요해서 iPhone을 하나 샀습니다. 그리고 Safari 안에 있는 아무 멎진 구글 웹 앱을 사용하는데 있어 아무런 문제가 없죠. 하지만 만약 구글이 웹 앱을 네이티브 앱인 것처럼 보여주면서 Springboard 상에 몰래 북마크(즐겨찾기)를 추가한다면 사기당한 느낌이 들겠죠.

이제 가야겠네요. 안 그러면 제 여자친구로부터 "제발 컴퓨터 좀 그만하고 3초만이라도 내 얼굴 좀 봐 주면 안돼 이 자식아"라고 바가지를 긁을게 뻔하니.

"

원문보기

From what I've gathered, here are some differences between the two:

  • PhoneGap basically generates native wrappers for what are still web apps. It spits out a WhateverYourPlatformIs project, you build it, and deploy. If we're talking about the iPhone (which is where I spend my time), it doesn't seem much different from creating a web app launcher (a shortcut that gets its own Springboard icon, so you can launch it like (like) a native app). The "app" itself is still html/js/etc., and runs inside a hosted browser control. What PhoneGap provides beyond that is a bridge between JavaScript and native device APIs. So, you write JavaScript against PhoneGap APIs, and PhoneGap then makes the appropriate corresponding native call. In that respect, it is different from deploying a plain old web app.

  • Titanium source gets compiled down to native bits. That is, your html/js/etc. aren't simply attached to a project and then hosted inside a web browser control - they're turned into native apps. That means, for example, that your app's interface will be composed of native UI components. There are ways of getting native look-and-feel without having a native app, but... well... what a nightmare that usually turns out to be.

The two are similar in that you write all your stuff using typical web technologies (html/js/css/blah blah blah), and that you get access to native functionality through custom JavaScript APIs.

But, again, PhoneGap apps (PhonGapps? I don't know... is that a stupid name? It's easier to say - I know that much) start their lives as web apps and end their lives as web apps. On the iPhone, your html/js/etc. is just executed inside a UIWebView control, and the PhoneGap JavaScript APIs your js calls are routed to native APIs.

Titanium apps become native apps - they're just developed using web dev tech.

What does this actually mean?

  1. A Titanium app will look like a "real" app because, ultimately, it is a "real" app.

  2. A PhoneGap app will look like a web app being hosted in a browser control because, ultimately, it is a web app being hosted in a browser control.

Which is right for you?

  • If you want to write native apps using web dev skills, Titanium is your best bet.

  • If you want to write an app using web dev skills that you could realistically deploy to multiple platforms (iPhone, Android, Blackberry, and whatever else they decide to include), and if you want access to a subset of native platform features (GPS, accelerometer, etc.) through a unified JavaScript API, PhoneGap is probably what you want.

You might be asking: Why would I want to write a PhoneGapp (I've decided to use the name) rather than a web app that's hosted on the web? Can't I still access some native device features that way, but also have the convenience of true web deployment rather than forcing the user to download my "native" app and install it?

The answer is: Because you can submit your PhoneGapp to the App Store and charge for it. You also get that launcher icon, which makes it harder for the user to forget about your app (I'm far more likely to forget about a bookmark than an app icon).

You could certainly charge for access to your web-hosted web app, but how many people are really going to go through the process to do that? With the App Store, I pick an app, tap the "Buy" button, enter a password, and I'm done. It installs. Seconds later, I'm using it. If I had to use someone else's one-off mobile web transaction interface, which likely means having to tap out my name, address, phone number, CC number, and other things I don't want to tap out, I almost certainly wouldn't go through with it. Also, I trust Apple - I'm confident Steve Jobs isn't going to log my info and then charge a bunch of naughty magazine subscriptions to my CC for kicks.

Anyway, except for the fact that web dev tech is involved, PhoneGap and Titanium are very different - to the point of being only superficially comparable.

I hate web apps, by the by, and if you read iTunes App Store reviews, users are pretty good at spotting them. I won't name any names, but I have a couple "apps" on my phone that look and run like garbage, and it's because they're web apps that are hosted inside UIWebView instances. If I wanted to use a web app, I'd open Safari and, you know, navigate to one. I bought an iPhone because I want things that are iPhone-y. I have no problem using, say, a snazzy Google web app inside Safari, but I'd feel cheated if Google just snuck a bookmark onto Springboard by presenting a web app as a native one.

Have to go now. My girlfriend has that could-you-please-stop-using-that-computer-for-three-seconds look on her face.

댓글목록

등록된 댓글이 없습니다.

Search

Copyright © Cmd 명령어 3.146.105.137